<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Banners extends Model
{
    use SoftDeletes;
    
    protected $table='banners';
    
    protected $primaryKey = 'id';
    
    protected $fillable = ['id','title','description','aid','sort','display'];
    
    protected $dates = ['deleted_at'];
    
    /**
     *  与附件一对一关联关系
     */
    public function attachment()
    {
        return $this->hasOne('App\Models\Attachment','aid','aid');
    }
}